<template>
	<image :src="imageSrc" class="checked-image" @tap="tap"></image>
</template>

<script>
	export default {
		name: "tar-checkbox",
		props: {
			value: {
				type: Boolean
			}
		},
		data() {
			return {

			};
		},
		computed: {
			imageSrc() {
				return this.value ? '/static/images/select.png' : '/static/images/not_select.png'
			}
		},
		methods: {
			tap() {
				this.$emit('input', !this.value)
			}
		}
	}
</script>

<style scoped>
	.checked-image {
		width: 36rpx;
		height: 36rpx;
	}
</style>